Update a campaign
기존 광고 캠페인을 업데이트하고 업데이트된 캠페인에 대한 정보를 반환합니다.
엑세스 제어:
- 캠페인의 소유자만 업데이트할 수 있습니다.
캠페인을 아카이브로 변경하면 캠페인에 할당된 예산이 반환됩니다.
curl --request PATCH \
--url https://your_a2_service/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_date": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-11-07T05:31:56Z",
"audience_segments": {},
"budget": 0,
"created_at": "2023-11-07T05:31:56Z",
"crid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_budget": 123,
"description": "<string>",
"max_bid": 0,
"min_daily_imp": 1000,
"sub_goal": "<string>",
"tagid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_cpa": 0,
"target_cpm": 0,
"target_volume": 0,
"updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://your_a2_service/campaigns"
payload = {
"end_date": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-11-07T05:31:56Z",
"audience_segments": {},
"budget": 0,
"created_at": "2023-11-07T05:31:56Z",
"crid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_budget": 123,
"description": "<string>",
"max_bid": 0,
"min_daily_imp": 1000,
"sub_goal": "<string>",
"tagid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_cpa": 0,
"target_cpm": 0,
"target_volume": 0,
"updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
end_date: '2023-11-07T05:31:56Z',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
start_date: '2023-11-07T05:31:56Z',
audience_segments: {},
budget: 0,
created_at: '2023-11-07T05:31:56Z',
crid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
daily_budget: 123,
description: '<string>',
max_bid: 0,
min_daily_imp: 1000,
sub_goal: '<string>',
tagid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target_cpa: 0,
target_cpm: 0,
target_volume: 0,
updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://your_a2_service/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'end_date' => '2023-11-07T05:31:56Z',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'owner_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_date' => '2023-11-07T05:31:56Z',
'audience_segments' => [
],
'budget' => 0,
'created_at' => '2023-11-07T05:31:56Z',
'crid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'daily_budget' => 123,
'description' => '<string>',
'max_bid' => 0,
'min_daily_imp' => 1000,
'sub_goal' => '<string>',
'tagid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'target_cpa' => 0,
'target_cpm' => 0,
'target_volume' => 0,
'updated_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/campaigns"
payload := strings.NewReader("{\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"audience_segments\": {},\n \"budget\": 0,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"crid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_budget\": 123,\n \"description\": \"<string>\",\n \"max_bid\": 0,\n \"min_daily_imp\": 1000,\n \"sub_goal\": \"<string>\",\n \"tagid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_cpa\": 0,\n \"target_cpm\": 0,\n \"target_volume\": 0,\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your_a2_service/campaigns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"audience_segments\": {},\n \"budget\": 0,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"crid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_budget\": 123,\n \"description\": \"<string>\",\n \"max_bid\": 0,\n \"min_daily_imp\": 1000,\n \"sub_goal\": \"<string>\",\n \"tagid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_cpa\": 0,\n \"target_cpm\": 0,\n \"target_volume\": 0,\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"audience_segments\": {},\n \"budget\": 0,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"crid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_budget\": 123,\n \"description\": \"<string>\",\n \"max_bid\": 0,\n \"min_daily_imp\": 1000,\n \"sub_goal\": \"<string>\",\n \"tagid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_cpa\": 0,\n \"target_cpm\": 0,\n \"target_volume\": 0,\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"bid_strategy": "highest_volume",
"end_date": "<string>",
"goal": "click",
"name": "<string>",
"no": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "<string>",
"status": "okay",
"audience_segments": {},
"budget": 0,
"created_at": "2023-11-07T05:31:56Z",
"crid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_budget": 123,
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_bid": 0,
"min_daily_imp": 1000,
"sub_goal": "<string>",
"tagid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_cpa": 0,
"target_cpm": 0,
"target_volume": 0,
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}인증
The access token received from the authorization server in the OAuth 2.0 flow.
본문
캠페인 정보 변경을 위한 스키마
캠페인을 위한 입찰 전략
highest_volume, bid_cap 캠페인의 종료 일시 (UTC 시간 사용 권장)
캠페인 목표
click, reach, impression, conversion 캠페인 이름
캠페인의 소유자 id
캠페인의 시작 일시 (UTC 시간 사용 권장)
캠페인 상태 정보
okay, preparing, ready, archived 타켓팅을 위한 오디언스 세그먼트 목록
캠페인의 총 예산
생성 일시
소재 설명
최대 입찰가
(입찰 전략을 maximize_volume으로 설정한 경우에만 유효함)
x >= 0내부 사용 목적
x >= 1000캠페인 세부 목표
결과당 목표 비용
x >= 01000번 노출당 지출하기 윈하는 희망가
(세부목표를 target_cpm으로 설정한 경우에만 유효함)
x >= 0캠페인 기간 내에 보장받을 노출수
(세부목표를 target_volume으로 설정한 경우에만 유효함)
x >= 0변경 일시
응답
Successful Response
캠페인의 모든 속성을 정의한 스키마
캠페인을 위한 입찰 전략
highest_volume, bid_cap 캠페인의 종료 일시 (UTC 시간 사용 권장)
캠페인 목표
click, reach, impression, conversion 캠페인 이름
캠페인의 소유자 id
캠페인의 시작 일시 (UTC 시간 사용 권장)
캠페인 상태 정보
okay, preparing, ready, archived 타겟팅을 위한 오디언스 세그먼트 목록
캠페인의 총 예산
생성 일시
캠페인의 설명
캠페인의 id
최대 입찰가
(입찰 전략을 maximize_volume으로 설정한 경우에만 유효함)
x >= 0내부 사용 목적
x >= 1000캠페인 세부 목표
결과당 목표 비용
x >= 01000번 노출당 지출하기 윈하는 희망가
(세부목표를 target_cpm으로 설정한 경우에만 유효함)
x >= 0캠페인 기간 내에 보장받을 노출수
(세부목표를 target_volume으로 설정한 경우에만 유효함)
x >= 0변경 일시
이 페이지가 도움이 되었나요?
curl --request PATCH \
--url https://your_a2_service/campaigns \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_date": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-11-07T05:31:56Z",
"audience_segments": {},
"budget": 0,
"created_at": "2023-11-07T05:31:56Z",
"crid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_budget": 123,
"description": "<string>",
"max_bid": 0,
"min_daily_imp": 1000,
"sub_goal": "<string>",
"tagid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_cpa": 0,
"target_cpm": 0,
"target_volume": 0,
"updated_at": "2023-11-07T05:31:56Z"
}
'import requests
url = "https://your_a2_service/campaigns"
payload = {
"end_date": "2023-11-07T05:31:56Z",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "2023-11-07T05:31:56Z",
"audience_segments": {},
"budget": 0,
"created_at": "2023-11-07T05:31:56Z",
"crid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_budget": 123,
"description": "<string>",
"max_bid": 0,
"min_daily_imp": 1000,
"sub_goal": "<string>",
"tagid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_cpa": 0,
"target_cpm": 0,
"target_volume": 0,
"updated_at": "2023-11-07T05:31:56Z"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
end_date: '2023-11-07T05:31:56Z',
id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
owner_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
start_date: '2023-11-07T05:31:56Z',
audience_segments: {},
budget: 0,
created_at: '2023-11-07T05:31:56Z',
crid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
daily_budget: 123,
description: '<string>',
max_bid: 0,
min_daily_imp: 1000,
sub_goal: '<string>',
tagid: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
target_cpa: 0,
target_cpm: 0,
target_volume: 0,
updated_at: '2023-11-07T05:31:56Z'
})
};
fetch('https://your_a2_service/campaigns', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://your_a2_service/campaigns",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'end_date' => '2023-11-07T05:31:56Z',
'id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'owner_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'start_date' => '2023-11-07T05:31:56Z',
'audience_segments' => [
],
'budget' => 0,
'created_at' => '2023-11-07T05:31:56Z',
'crid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'daily_budget' => 123,
'description' => '<string>',
'max_bid' => 0,
'min_daily_imp' => 1000,
'sub_goal' => '<string>',
'tagid' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'target_cpa' => 0,
'target_cpm' => 0,
'target_volume' => 0,
'updated_at' => '2023-11-07T05:31:56Z'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://your_a2_service/campaigns"
payload := strings.NewReader("{\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"audience_segments\": {},\n \"budget\": 0,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"crid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_budget\": 123,\n \"description\": \"<string>\",\n \"max_bid\": 0,\n \"min_daily_imp\": 1000,\n \"sub_goal\": \"<string>\",\n \"tagid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_cpa\": 0,\n \"target_cpm\": 0,\n \"target_volume\": 0,\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://your_a2_service/campaigns")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"audience_segments\": {},\n \"budget\": 0,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"crid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_budget\": 123,\n \"description\": \"<string>\",\n \"max_bid\": 0,\n \"min_daily_imp\": 1000,\n \"sub_goal\": \"<string>\",\n \"tagid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_cpa\": 0,\n \"target_cpm\": 0,\n \"target_volume\": 0,\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your_a2_service/campaigns")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"end_date\": \"2023-11-07T05:31:56Z\",\n \"id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"owner_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"start_date\": \"2023-11-07T05:31:56Z\",\n \"audience_segments\": {},\n \"budget\": 0,\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"crid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"daily_budget\": 123,\n \"description\": \"<string>\",\n \"max_bid\": 0,\n \"min_daily_imp\": 1000,\n \"sub_goal\": \"<string>\",\n \"tagid\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"target_cpa\": 0,\n \"target_cpm\": 0,\n \"target_volume\": 0,\n \"updated_at\": \"2023-11-07T05:31:56Z\"\n}"
response = http.request(request)
puts response.read_body{
"bid_strategy": "highest_volume",
"end_date": "<string>",
"goal": "click",
"name": "<string>",
"no": 123,
"owner_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"start_date": "<string>",
"status": "okay",
"audience_segments": {},
"budget": 0,
"created_at": "2023-11-07T05:31:56Z",
"crid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"daily_budget": 123,
"description": "<string>",
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_bid": 0,
"min_daily_imp": 1000,
"sub_goal": "<string>",
"tagid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"target_cpa": 0,
"target_cpm": 0,
"target_volume": 0,
"updated_at": "2023-11-07T05:31:56Z"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}